package com.firewolf.springboot.main;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;

import com.firewolf.springboot.beans.TestService2;

//一、默认情况下，@SpringBootApplication注解会扫描当前类所在包或者子包下的类，
//   如果需要扫描其他的包，可以如下使用@ComponentScan的basePackages属性
@SpringBootApplication
@ComponentScan(basePackages={"com.firewolf.springboot.controller","com.firewolf.springboot.conf"})
public class App {
	public static void main(String[] args) {
		SpringApplication.run(App.class, args);
	}
	
	@Bean
	public TestService2 getTestService2(){
		return new TestService2();
	}
}
